package com.cci.kangdao.dao;

import com.cci.kangdao.dao.model.PartInfoT;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.mybatis.spring.annotation.MapperScan;

import java.util.List;
import java.util.Map;

/**
 * @author William Du
 * @date 2020/2/12
 */
@MapperScan
public interface PartInfoTDao {
    int deleteByPrimaryKey(Long id);

    int insert(PartInfoT record);

    int insertSelective(PartInfoT record);

    int batchInsert(List<PartInfoT> records);

    PartInfoT selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(PartInfoT record);

    int updateByPrimaryKey(PartInfoT record);

    @Select("select * from PartInfo_T where ID = #{partInfoId} and Flag = 0")
    Map<String,Object> getPartInfoTById(@Param("partInfoId")long partInfoId);

    @Select("select * from PartInfo_T where PartNumber = #{partNumber} and Flag = 0")
    Map<String,Object> getPartInfoTByPartNumber(@Param("partNumber")String partNumber);
}